package org.yanghe.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.yanghe.service.ConsumerService;

import javax.annotation.Resource;

@RestController
public class ConsumerController {

    //动态代理对象，内部远程调用服务生产者
    @Resource
    ConsumerService service;

    @GetMapping("/consumer/hello/{name}")
    public String hello(@PathVariable("name")String name){
        return service.hello(name)+" | ConsumerController";
    }
}
